﻿/*
 * Created by SharpDevelop.
 * User: IEscarro
 * Date: 9/8/2009
 * Time: 2:30 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using Buaya.Model.Dao.Interface;
using System.Data;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Configuration;

namespace Buaya.Model.Dao.Access
{
	/// <summary>
	/// Description of AccessDepartmentDao.
	/// </summary>
	public class AccessDepartmentDao : IDepartmentDao
	{
		public AccessDepartmentDao()
		{
		}
		
		public void SaveOrUpdate(Department d)
		{
			throw new NotImplementedException();
		}
		
		public void Delete(Department d)
		{
			throw new NotImplementedException();
		}
		
		public Department ReadByPk(int id)
		{
			throw new NotImplementedException();
		}
		
		public IList<Department> FindAll()
		{
			throw new NotImplementedException();
		}
		
		public DataSet FindAllDS()
		{
			DataSet ds = new DataSet();
			OleDbConnection conn = AccessDaoFactory.CreateConnection();
			OleDbDataAdapter da = new OleDbDataAdapter("select * from company", conn);
			da.Fill(ds, "company");
			da = new OleDbDataAdapter("select * from departments", conn);
			da.Fill(ds, "departments");
			return ds;
		}
	}
}
